home *** CD-ROM | disk | FTP | other *** search
- head 1.8;
- branch ;
- access ;
- symbols ;
- locks ; strict;
- comment @@;
-
-
- 1.8
- date 91.04.11.12.53.36; author kupfer; state Exp;
- branches ;
- next 1.7;
-
- 1.7
- date 89.10.09.21.28.49; author rab; state Exp;
- branches 1.7.1.1;
- next 1.6;
-
- 1.6
- date 89.08.18.11.21.56; author douglis; state Exp;
- branches ;
- next 1.5;
-
- 1.5
- date 89.08.17.11.16.29; author douglis; state Exp;
- branches ;
- next 1.4;
-
- 1.4
- date 89.04.06.21.40.45; author jhh; state Exp;
- branches ;
- next 1.3;
-
- 1.3
- date 88.12.28.17.05.59; author ouster; state Exp;
- branches ;
- next 1.2;
-
- 1.2
- date 88.11.27.16.29.05; author ouster; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 88.09.09.17.43.49; author ouster; state Exp;
- branches ;
- next ;
-
- 1.7.1.1
- date 89.10.27.10.36.29; author douglis; state Exp;
- branches ;
- next ;
-
-
- desc
- @@
-
-
- 1.8
- log
- @Flush DEFTARGET: the default target is now determined by a pmake
- library file.
- @
- text
- @#!/sprite/cmds/csh -f
- #
- # A script to generate (or regenerate) a Makefile for the topmost directory
- # of a library that is divided up into subdirectories. This direcctory is
- # little more than a container for lots of subdirectories that have the
- # interesting stuff in them.
- #
- # We assume we were invoked from mkmf.
- #
- # Parameters passed in from mkmf as environment variables:
- # MKMFDIR directory containing prototype makefiles
- # MAKEFILE name of makefile to create
- # MACHINES list of machine names (e.g. "sun2 sun3"), for
- # which there are machine-dependent subdirectories
- # (sun3.md, spur.md, etc.) of this directory.
- # SUBTYPE what sort of library this is: "sprite", "x", etc.
- #
- # Several of these environment variables must be copied to local shell
- # variables before use, because shell variables can be used in some places
- # where environment variables can't.
- #
- # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmdtop,v 1.7 89/10/09 21:28:49 rab Exp Locker: kupfer $ (SPRITE) Berkeley
- #
-
- #
- # Argument processing. (Generalized form, even though just one flag so far.)
- #
- while ($#argv >= 1)
- if ("$1" == '-x') then
- set echo
- endif
- shift
- end
-
- set subtype=$SUBTYPE
- set name=$cwd:t
- set machines=($MACHINES)
- set makefile=$MAKEFILE
- set distdir=($DISTDIR)
-
- if (-e $makefile.proto) then
- set proto=$makefile.proto
- else
- set proto="${MKMFDIR}/Makefile.bigcmdtop"
- endif
-
- echo "Generating $makefile for $cwd using $proto"
-
- set subDirs="`find * -type d ! -name \*.md ! -name RCS -prune -print`"
-
- if ("$subDirs" == "") then
- echo "No subdirectories found."
- endif
-
- set nonomatch
- set manPages = (*.man)
- if ("$manPages" == "*.man") then
- set manPages = ()
- endif
- unset nonomatch
-
- cat $proto | sed \
- -e "s,@@(DATE),`date`,g" \
- -e "s,@@(MACHINES),$machines,g" \
- -e "s,@@(MAKEFILE),$makefile,g" \
- -e "s,@@(MANPAGES),$manPages,g" \
- -e "s,@@(NAME),$name,g" \
- -e "s,@@(SUBDIRS),$subDirs,g" \
- -e "s,@@(TEMPLATE),$proto,g" \
- -e "s,@@(TYPE),$subtype,g" \
- -e "s,@@(DISTDIR),$distdir,g" \
- > $makefile
- @
-
-
- 1.7
- log
- @Modifications for distribution.
- @
- text
- @a10 1
- # DEFTARGET name of default target
- d22 1
- a22 1
- # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmdtop,v 1.6 89/08/18 11:21:56 douglis Exp Locker: rab $ (SPRITE) Berkeley
- a38 1
- set defTarget=($DEFTARGET)
- a63 1
- -e "s,@@(DEFTARGET),${defTarget:q},g" \
- @
-
-
- 1.7.1.1
- log
- @add dependencies to make the linked files depend on recursive makes.
- this is a branch because we chose to do it using bigcmdtop.mk instead.
- @
- text
- @d23 1
- a23 1
- # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmdtop,v 1.7 89/10/09 21:28:49 rab Exp Locker: douglis $ (SPRITE) Berkeley
- a75 7
-
- # add dependencies to make the linked files depend on recursive makes.
- # the tr is needed because csh is brain-damaged about "$" within single quotes,
- # even when escaped.
- foreach subdir ($subDirs)
- echo "$subdir/%(TM).md/linked.o $subdir/%(TM).md/linked.po: $subdir" | tr % '$' >> $makefile
- end
- @
-
-
- 1.6
- log
- @another change for TM -- use single machine if it exists, else \ds3100
- @
- text
- @d23 1
- a23 1
- # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmdtop,v 1.4 89/04/06 21:40:45 jhh Exp Locker: douglis $ (SPRITE) Berkeley
- d41 1
- d74 1
- @
-
-
- 1.5
- log
- @removed DEFTARGET -- we use $MACHINE now
- @
- text
- @d11 1
- d40 1
- d65 1
- @
-
-
- 1.4
- log
- @added abilty to make specific machine types
- @
- text
- @a10 1
- # DEFTARGET name of default target
- d22 1
- a22 1
- # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmdtop,v 1.3 88/12/28 17:05:59 ouster Exp $ (SPRITE) Berkeley
- a38 1
- set defTarget=($DEFTARGET)
- a62 1
- -e "s,@@(DEFTARGET),$defTarget,g" \
- @
-
-
- 1.3
- log
- @Replace INSTALLDIR and INSTALLMAN with TYPE.
- @
- text
- @d11 1
- d23 1
- a23 1
- # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmdtop,v 1.2 88/11/27 16:29:05 ouster Exp $ (SPRITE) Berkeley
- d40 1
- a48 6
-
- if (" $machines " =~ *\ sun3\ *) then
- set defTarget=sun3
- else
- set defTarget=$machines[1]
- endif
- @
-
-
- 1.2
- log
- @Various changes to replace old C library entirely with new C library.
- @
- text
- @d22 1
- a22 1
- # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmdtop,v 1.1 88/09/09 17:43:49 ouster Exp Locker: ouster $ (SPRITE) Berkeley
- a35 25
- switch ($subtype)
- case sprite:
- set installdir=/sprite/cmds
- set installman=/sprite/doc/ref/cmds
- breaksw
- case daemon:
- set installdir=/sprite/daemons
- set installman=/sprite/doc/ref/daemons
- breaksw
- case test:
- set installdir=/sprite/tests
- set installman=/sprite/doc/ref/tests
- breaksw
- case admin:
- set installdir=/sprite/admin
- set installman=/sprite/doc/ref/admin
- breaksw
- case x:
- set installdir=/X/cmds
- set installman=/X/doc/ref/cmds
- breaksw
- default:
- echo Unknown library subtype "$subtype"
- exit 1
- endsw
- a69 2
- -e "s,@@(INSTALLDIR),$installdir,g" \
- -e "s,@@(INSTALLMAN),$installman,g" \
- d76 1
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d18 3
- a20 1
- # $Header: mkmf.biglibtop,v 1.1 88/08/20 12:58:43 ouster Exp $ (SPRITE) Berkeley
- d22 2
- d39 1
- d41 12
- d55 1
- d61 1
- a61 1
- set lib=$cwd:t
- d85 7
- d93 1
- a93 2
- -e "s,@@(NAME),$lib,g" \
- -e "s,@@(MACHINES),$machines,g" \
- a94 1
- -e "s,@@(SUBDIRS),$subDirs,g" \
- d96 2
- d99 3
- a102 1
- -e "s,@@(DATE),`date`,g" \
- @
-